package cn.edu.ldu.util;

import org.omg.CORBA.PUBLIC_MEMBER;

public class Consts {


    public static final String ipv4 = "10.34.8.108";
    public static final String host = "http://127.16.72.100:";
    //服务器
    public static final int port = 7777;
    //数据库
    public static final int requestPort = 8080;
    public static final String path = "/ticktick/";
    public static final String urlBody = host + requestPort + path;

    /**
     * 通过id获取信息
     * get: PathVariable -- id
     * app/user/info/{id}
     */
    public static final String findUserById = urlBody + "app/user/info/";
    /**
     * 保存用户信息
     * post: requestBody -- user实体
     * app/user/save
     */
    public static final String setUserInfo = urlBody + "app/user/save";
    /**
     * 获取好友列表
     * get: PathVariable -- userId
     * app/friends/list/{userId}
     */
    public static final String getFriendsByIUserId = urlBody + "app/friends/list/";
    /**
     * 添加好友
     * post: requestBody -- friend实体
     * app/friends/save
     */
    public static final String addFriend = urlBody + "app/friends/save";

    public static final String updateFriend = urlBody + "app/friends/update";

    public static final String getChatHistoryByUserId = urlBody + "app/chathistory/list";

    public static final String addChatHistory = urlBody + "app/chathistory/save";

    public static final String getWithoutHandleMSG_CHAT = urlBody + "app/chathistory/liststatus";

    public static final String getWithoutHandleMSG_FRIEND = urlBody + "app/friends/liststatus";


    /**
     *     消息类型：
     *     M_LOGIN：用户登录消息
     *     M_SUCCESS：登陆成功
     *     M_FAILURE：登陆失败
     *     M_ACK：服务器对登录用户的回应信息
     *     M_MSG：会话消息
     *     M_LOGOUT：用户退出消息
     *     R_FRIENDS：获取好友请求
     *     R_CHAT_HISTORY：获取聊天记录请求
     */
    public static final String M_LOGIN = "M_LOGIN";
    public static final String M_SUCCESS = "M_SUCCESS";
    public static final String M_FAILURE = "M_FAILURE";
    public static final String M_ACK = "M_ACK";
    public static final String M_MSG = "M_MSG";
    public static final String M_LOGOUT = "M_LOGOUT";
    public static final String M_FRIEND_LOGOUT = "M_FRIEND_LOGOUT";
    public static final String R_ADD_FRIENDS = "R_ADD_FRIENDS";
    public static final String R_CHAT_HISTORY = "R_CHAT_HISTORY";

    /**
     * 文本信息类型
     */
    public static final String CHAT_MSG = "CHAT_MSG";
    public static final String FRIEND_MARK = "CHAT_MSG";
    public static final String FRIEND_LIST = "FRIEND_LIST";
    public static final String CHAT_HISTORY = "ChatHistory";
    public static final String CHAT_HISTORY_STATUS = "CHAT_HISTORY_STATUS";

    /**
     * 协议
     */
    public static final String P_LOGIN_SUCCESS = "LoginSuccess";
    public static final String P_FRIEND_ONLINE = "FriendOnline";
    public static final String P_LOGIN_FAILURE = "LoginFailure";
    public static final String P_CHAT_FRIEND = "ChatWithFriend";
    public static final String P_REGISTER_SUCCESS = "RegisterSuccess";
    public static final String P_REGISTER_FAILURE = "RegisterFailure";
    public static final String P_CHAT_HISTORY = "ChatHistory";


    /**
     * map
     */
    public static final String K_USER_INFO = "userInfo";
    public static final String K_USER_ACCOUNT = "accountInfo";
    public static final String K_ONLINE_FRIEND = "onlineFriends";
    public static final String K_OFFLINE_FRIEND = "offlineFriends";
    public static final String K_TODO_CHAT_FRIEND = "todoChatMsg";
    public static final String K_TODO_FRIEND_FRIEND = "todoFriendMsg";
    public static final String K_GROUP_CHAT = "groupChat";
    /**
     * 客户端发功给服务器端
     */


    /**
     * 客户端Login 坐标
     */
    public static final int L_LOGIN_WIDTH=650;
    public static final int L_LOGIN_HEIGHT_NORMAL=500;
    public static final int L_LOGIN_HEIGHT_OPEN=900;
    public static final int L_CONTENT_WIDTH=650;
    public static final int L_CONTENT_HEIGHT_NORMAL=50;
    public static final int L_CONTENT_HEIGHT_OPEN=500;
    public static final int L_CONTENTS_HEIGHT_OPEN=360;

}
